﻿using ReactiveUI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace DataTurnClient
{
    public class Log : ReactiveObject,INotifyPropertyChanged
    {
        /// <summary>
        /// 发生时间
        /// </summary>
        public string HappenTime
        {
            get => _HappenTime;
            set
            {
                _HappenTime = value;
                NotifyPropertyChanged();
            }
        }
        private string _HappenTime;

        /// <summary>
        /// 发生模块
        /// </summary>
        public string HappenModel
        {
            get => _HappenModel;
            set
            {
                _HappenModel = value;
                NotifyPropertyChanged();
            }
        }
        private string _HappenModel;

        /// <summary>
        /// 发生描述
        /// </summary>
        public string HappenDtal
        {
            get => _HappenDtal;
            set
            {
                _HappenDtal = value;
                NotifyPropertyChanged();
            }
        }
        private string _HappenDtal;


        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); //实现通知刷新
        }
    }

    public class LogRead
    { 
        public string ModelName { get; set; }

        public string ModelContent { get; set; }
    }
}
